You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the source for StreamWriter in .NET Core latest (should be similar in other runtimes) this only closes but does not dispose the inner stream.
It might be prudent to change the start of the code to:
The specific reason I'm asking for this, is that we're seeing ErrorExceptions with inner SocketExceptions claiming AddressAlreadyInUse (10048) errors. This happens after we send a few thousand SMSs, and seems to indicate that sockets on the host are being consumed faster than they become available. So maybe if we don't wait for the GC to collect the .GetRequestStream(), and instead dispose via a using as I suggest, things might improve.
The text was updated successfully, but these errors were encountered:
In the
RestClient.cs
there is the following code:csharp-rest-api/MessageBird/Net/RestClient.cs
Lines 203 to 206 in c6e2199
Looking at the source for
StreamWriter
in .NET Core latest (should be similar in other runtimes) this only closes but does not dispose the inner stream.It might be prudent to change the start of the code to:
The specific reason I'm asking for this, is that we're seeing
ErrorException
s with innerSocketException
s claimingAddressAlreadyInUse
(10048
) errors. This happens after we send a few thousand SMSs, and seems to indicate that sockets on the host are being consumed faster than they become available. So maybe if we don't wait for the GC to collect the.GetRequestStream()
, and instead dispose via ausing
as I suggest, things might improve.The text was updated successfully, but these errors were encountered: