The discovery of two neutron stars with gravitational masses $approx 2~M_odot$ has placed a strong lower limit on the maximum mass of nonrotating neutron stars, and with it a strong constraint on the properties of cold matter beyond nuclear density. Current upper mass limits are much looser. Here we note that, if most short gamma-ray bursts are produced by the coalescence of two neutron stars, and if the merger remnant collapses quickly, then the upper mass limit is constrained tightly. If the rotation of the merger remnant is limited only by mass-shedding (which seems probable based on numerical studies), then the maximum gravitational mass of a nonrotating neutron star is $approx 2-2.2~M_odot$ if the masses of neutron stars that coalesce to produce gamma-ray bursts are in the range seen in Galactic double neutron star systems. These limits would be increased by $sim 4$% in the probably unrealistic case that the remnants rotate at $sim 30$% below mass-shedding, and by $sim 15$% in the extreme case that the remnants do not rotate at all. Future coincident detection of short gamma-ray bursts with gravitational waves will strengthen these arguments because they will produce tight bounds on the masses of the components for individual events. If these limits are accurate then a reasonable fraction of double neutron star mergers might not produce gamma-ray bursts. In that case, or in the case that many short bursts are produced instead by the mergers of neutron stars with black holes, the implied rate of gravitational wave detections will be increased.