I have an app which uses a ServerSocket to serve HTML over HTTP on localhost to a HTMLViewer, in order to play a video file. Works great.
However, testing in Big Sur reveals an interesting glitch: If I close the window (which destroys both the ServerSocket and the HTMLViewer), and then re-open the window and try it again, sometimes on Big Sur it does not work. I get a blank screen, and the HTMLViewer’s error event fires with a -1001 Timeout after a couple of minutes.
- If I try it again immediately, it works - so it basically works every other time
- If, after closing the window, I wait about 60 seconds and try it again, it works.
- ServerSocket.Listen always succeeds and there are no errors.
- When it falis, ServerSocket.AddSocket never fires, as if there is no connection attempt being made at all.
- I’m using the same port number each time
My theory is that the safari video playback engine in Big Sur is not letting go of the sockets immediately, so that when I try to start everything over, the port is still busy and it fails.
Anyone else out there using ServerSockets on BigSur and noticing problems?
I’m using Xojo 2019R1.1.