indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
153 stars 70 forks source link

fix crash issue on windows #495

Closed tail-feather closed 1 year ago

tail-feather commented 1 year ago

On windows, close(server->socket) should be closesocket(server->socket).

same as: https://github.com/indigo-astronomy/indigo/blob/a86c08f1d46d46806a2690dc5710cac4563d7afc/indigo_libs/indigo_client.c#L417-L421

rumengb commented 1 year ago

which compiler you use? I am using it for years with gcc and I have not seen any issues whatsoever. if you use msvc we may need to add condition to use closesocket() when msvc is used or test this extensively with gcc.

On Fri, Sep 1, 2023, 7:48 PM tail-feather @.***> wrote:


You can view, comment on, or merge this pull request online at:

https://github.com/indigo-astronomy/indigo/pull/495 Commit Summary

File Changes

(1 file https://github.com/indigo-astronomy/indigo/pull/495/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/indigo-astronomy/indigo/pull/495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5EZBMBBOBZH6JPIEUMYMLXYIGVFANCNFSM6AAAAAA4H2CH2Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rumengb commented 1 year ago

Seems to be fine with gcc too... but please tell me which compiler are you using?

tail-feather commented 1 year ago

Oh... It's odd...

I use MSVC 2019 compiler.
And crash occurs if specify invaild ip address.

tail-feather commented 1 year ago

Maybe it has to be x64. https://stackoverflow.com/a/76847472

Crash occurs on x64 dll.