title: Windows 10 IOT got BSOD when using StreamSocket as client
body: <p>I have an app running on Raspi 3 windows 10 IOT Build 14279 that Connect, Send, CloseSocket right after when I push a button.
  app runs OK for 5 minutes after that a BSOD appear with a message "IRQL_NOT_LESS_OR_EQUAL (NETIO.SYS)". Sorry for my English
  here it is my code</p>
  
  <pre><code>private async Task Connect()
      {            
          if(connected||connecting)
          {               
              return;
          }            
          connecting = true;           
          _socket = new StreamSocket();           
          try
          {                
              await _socket.ConnectAsync(hostname, "100");
              connected = true;
              connecting = false;
          }
          catch (Exception exception)
          {
  
              if (SocketError.GetStatus(exception.HResult) == SocketErrorStatus.Unknown)
              {
                  throw;
              } 
              connecting = false;
              _socket.Dispose();
              _socket = null;
  
          }            
      }
  
      private async Task Send(byte[] S)
      {            
          if(!connected)
          { 
              return;
          }            
  
          try
          {
              DataWriter writer = new DataWriter(_socket.OutputStream);
              writer.WriteInt32(S.Length);
              writer.WriteBytes(S);
              await writer.StoreAsync();               
              writer.DetachBuffer();
              writer.Dispose();
          }
          catch (Exception exception)
          {                
              if (SocketError.GetStatus(exception.HResult) == SocketErrorStatus.Unknown)
              {
                  throw;
              }                
              _socket.Dispose();
              _socket = null;
              connected = false;
          }            
      }
  
      private void CloseSocket()
      {           
          if(!connected)
          {
              return;
          }
          connected = false;
          _socket.Dispose();
          _socket = null;                  
      }
  </code></pre>